import { createApp } from "vue";
import App from "./App.vue";
//import "./registerServiceWorker";
import router from "./router";

import { setupStore } from '@/store';

import { setupI18n } from '@/locales/setupI18n';

//import axios from 'axios';
import Antd from "ant-design-vue/es";
import "ant-design-vue/dist/antd.css";

import Share from 'vue-social-share'
import 'vue-social-share/dist/client.css';
import '../node_modules/social-share.js/dist/js/social-share.min.js'
// url                 : '', // 网址，默认使用 window.location.href
// source              : '', // 来源（QQ空间会用到）, 默认读取head标签：<meta name="site" content="http://overtrue" />
// title               : '', // 标题，默认读取 document.title 或者 <meta name="title" content="share.js" />
// description         : '', // 描述, 默认读取head标签：<meta name="description" content="PHP弱类型的实现原理分析" />
// image               : '', // 图片, 默认取网页中第一个img标签
// sites               : ['qzone', 'qq', 'weibo','wechat', 'douban'], // 启用的站点
// disabled            : ['google', 'facebook', 'twitter'], // 禁用的站点
// wechatQrcodeTitle   : '微信扫一扫：分享', // 微信二维码提示文字
// wechatQrcodeHelper  : '<p>微信里点“发现”，扫一下</p><p>二维码便可将本文分享至朋友圈。</p>'


//import Global from './utils/global'
//window.global = new Global(Vue, store);
//import VCApi from "@vue/composition-api";
//import 'vite-plugin-svg-icons/register';
//createApp(App).use(VCApi);
(async () => {
    const app = createApp(App);

    // Configure vuex store
    setupStore(app);

    await setupI18n(app);

    app.use(router);

    app.use(Antd);

    app.use(Share);

    app.mount('#app', true);

    // 定义全局变量
    app.config.globalProperties.$http = 'xxxxx'
})();
